package com.struct.factory
{
	import com.struct.graph.login.LoginPanel;
	import com.struct.graph.login.LoginPanelGraphWorker;
	
	import sacu.s.Factory;
	
	public class LoginFactory extends Factory
	{
		private var loginPanel:LoginPanel;
		private var loginPanelGW:LoginPanelGraphWorker;
		public function LoginFactory(Name:String)
		{
			super(Name);
		}
		override protected function onInitFactory():void{
			super.onInitFactory();
			loginPanel = new LoginPanel(250, 180);
			loginPanelGW = new LoginPanelGraphWorker("LoginPanelGraphWorker", loginPanel);
		}
		override protected function onStartFactory():void{
			super.onStartFactory();
			registerGraphicsWorker(loginPanelGW);
			SSA.application.popUpManager.addPopUp(loginPanel);
		}
		override public function disposeFactory():void{
			super.disposeFactory();
			removeGraphicsWorker(loginPanelGW.eName);
			SSA.application.popUpManager.removePopUp(loginPanel);
		}
	}
}